﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using Baggr.ClientSite;

namespace Baggr
{
    public partial class FeedDataContext
    {
        static private readonly DebuggerWriter DebugWriter = new DebuggerWriter();
        partial void OnCreated()
        {
            Log = DebugWriter;
        }
    }

    public partial class Folder
    {
        
    }
    public partial class FeedItem
    {
        public int? Rate
        {
            get
            {
                if (FeedItemRates.Count() < 1)
                    return null;

                return (int)FeedItemRates.Average(curr=>curr.Rate);
            }
        }
    }
}
